<%--
 *  @Author: JackYin 
 *  Date:    2011/1/22
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="com.oval.util.*" %>


<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="http://dcms.oval.com/page/dcms" prefix="dcms" %>
<%

  String strModuleName = "TDR";
  String privilegeCode = "A0601,A0602";
  String contextPath = request.getContextPath();
  HashMap userinfos = (HashMap)session.getAttribute("userinfo");
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<html>
<head>
<title></title>
<%@ include file="/inc/CatchError.inc"%>
<PageFlow:CheckPageFlow pageName="p_zyloridataupload" />
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file="/rpt/ReportURL.inc" %>
<script language="JavaScript">
var pname;
function page_operate(operand)
{
	   
   if (isEmpty(cform.uploadfile.value)) {
       alert('请选择上载的文件！');
         return;
       }
   var realfilepath = eval("cform.uploadfile");
   var filename = "";
   var filetype = "";
   pname = realfilepath.value;
   pname = pname.substring(pname.lastIndexOf("\\") + 1, pname.length);
   cform.filename.value = pname;
   page_checkFilename(pname); 
}

function page_upload(){
	var tmpfilename = document.cform.tempfilename.value;
	var suffix = pname.substring(pname.lastIndexOf(".") + 1);
	if(suffix.toLowerCase()!="xls" && suffix.toLowerCase()!="xlsx" &&  suffix.toLowerCase()!="csv" ){
	   	alert("上载的文件格式只能为：xls、xlsx、csv");
	   	eturn;
	 }
	cform.filetype.value = suffix;
	cform.encoding="multipart/form-data";
	cform.actionname.value = "upload";
	cform.target = "_self";
	cform.submit();
}
//check chongfu
function page_checkFilename(pname){
	var  datahandler = new  DataHandler();
	datahandler.add_params("pname" , pname, 'String');
	datahandler.getResult("filename","document.cform.tempfilename");
	datahandler.add_job("j_monthcheckfilename");
	datahandler.runDataHandler();
	setTimeout("page_upload();","250");

 }
</script>
<style type="text/css">
	.bd{
	padding-top:0px;
	<--height:15px;-->
	}
	.sz{
	padding-left:10px;
	padding-right:5px;
	padding-top:15px;
	float:left;}
	
	div.RoundedCorner{background: #FDFAC5;margin-top:5px;} 
	b.rtop, b.rbottom{display:block;background: #FFFFFF} 
	b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #FDFAC5} 
	b.r1{margin: 0 5px} 
	b.r2{margin: 0 3px} 
	b.r3{margin: 0 2px} 
	b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px} 
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<iframe id="reloadHandler" name="reloadHandler" style="display: none"></iframe>
<span style="display:none">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
<input type="hidden" name="pagename" value="p_zyldatafalsify">
<input type="hidden" name="actionname">   
<input type="hidden" name="filename">
<input type="hidden" name="filetype">
<custom:hidden property="tempfilename"/>
</span>
<div id="div1" style="border:1px solid #44BBBB;width:100%px;">
      <input type="hidden" name="languagecode" value="<%= strLanguageCode %>">
    <div class="bd" >
 <!--<div class="sz" >
	  <input type="file" name="uploadfile" width="400" class="input_sz" />&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="page_operate('upload')"><input type=button class="button1" value="上载" style="width:60" /></a>
	</div>  -->
<br><br><br>
</form>
<div class="title-big-b-center">文件导入日志</div>
<dcms:summary id="tdr.orguploaddateinfo">
	<dcms:param name="userid" property="session:userinfo.userid"/>
</dcms:summary>
</body>
</html>
